package org.gui.similarityMeasureSelection;

import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class TermFrequencyMatrixPanel extends JPanel{
		
			
private static final long serialVersionUID = 1L;
	
	JCheckBox isTfmSelected;	
	JLabel tfmLabel;
	JTextField tfmInput;

	
public TermFrequencyMatrixPanel(){

	setLayout(new GridLayout(1,4,0,10));
	isTfmSelected = new JCheckBox("TFM");
	tfmLabel = new JLabel("Words= ");
	tfmLabel.setHorizontalAlignment(JLabel.RIGHT);
	tfmInput = new JTextField();

	add(isTfmSelected);
	add(tfmLabel);
	add(tfmInput);
	add(new JPanel());
	add(new JPanel());
}

public boolean isSelected() {
	return isTfmSelected.isSelected();
}

public ArrayList<String> getSimilarityMeasure(){
	ArrayList<String> answer = new ArrayList<String>();
	if(isTfmSelected.isSelected()==true){
		answer.add(tfmInput.getText());
		return answer;
	}	
	return null;
}

}
